package com.lebang.feign.bus;

import com.lebang.feign.bus.fallback.MemberBussCollectRecordFallback;
import com.lebang.model.RequestUserInfo;
import com.lebangweb.response.JsonData;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ljx
 */
@FeignClient(name = "wangzhuan-bus", contextId = "wangzhuan-bus-collectrecord", fallback = MemberBussCollectRecordFallback.class)
public interface MemberBussCollectRecordFeign {

    @PostMapping("/buss/collectrecord/add")
    JsonData addRecord(@RequestBody RequestUserInfo userInfo,
                        @ApiParam(name = "城市id") @RequestParam("cityId") String cityId,
                        @ApiParam(name = "线路id") @RequestParam("route") String route,
                        @ApiParam(name = "公交线路") @RequestParam("routeId") String routeId,
                        @ApiParam(name = "终点站") @RequestParam("endStan") String endStan,
                        @ApiParam(name = "路线编号") @RequestParam("routeNum") String routeNum);

    @PostMapping("/buss/collectrecord/get")
    JsonData selectByCityId(@RequestBody RequestUserInfo userInfo,@RequestParam("cityId") String cityId);

    @PostMapping("/buss/collectrecord/update")
    JsonData updateByCityId(@RequestBody RequestUserInfo userInfo,@RequestParam("cityId") String cityId,@RequestParam("routeId") String routeId);

    @PostMapping("/buss/collectrecord/top")
    JsonData top(@RequestBody RequestUserInfo userInfo,@RequestParam("cityId") String cityId,@RequestParam("routeId") String routeId);

    @PostMapping("/buss/collectrecord/changeline")
    JsonData changeLine(@RequestBody RequestUserInfo userInfo,@RequestParam("cityId") String cityId,@RequestParam("routeId") String routeId);

    @PostMapping("/buss/collectrecord/canceltop")
    JsonData cancelTop(@RequestBody RequestUserInfo userInfo,@RequestParam("cityId") String cityId,@RequestParam("routeId") String routeId);
}
